home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
shadowlib.lha
/
shadow
/
Docs
/
ShadowUpdate.doc
< prev
Wrap
Text File
|
1992-11-13
|
13KB
|
360 lines
Shadow Development Documentation
Library Version 5.0
By David Navas
Updated: 13 Nov 1992
Copyright © 1992 by David Navas
All Rights Reserved
V1.2 fixed the following bugs:
Browser.c and gui.c should now compile without kludging with external
#includes. Previously, I was using a precompiled header....
Browser should no longer crash on 1.3 systems. It won't work, but it
shouldn't crash (untested).
Browser's premethod test (available if compiling with -dSPEEDTEST) is
more robust (uses METHOD_FLAG_CHECK_CONTINUE).
Object's stored by name (like process objects) are now displayed by
name, instead of by object address as previously.
Shadow now checks for a NULL method object passed to
RemovePatchedMethod().
DJM() now correctly deals with patches that are patches on different
methods correctly. Previously, it would send the method to all patches
defined for the class, irregardless of the method they were supposed
to be patching.
InitOOProgram() initializes tc_UserData to NULL.
DestroyMeta() eliminated, library vector replaced with MessageMaker().
DestroyMeta() is now taken care of by the METHOD_META_DESTROY method
of the associated meta.
Processes now use anonymous ports. Previously, the port was named the
same as FindTask(NULL)->tc_Node.ln_Name, but this meant you couldn't
run two of the same types of programs, leading to tricky hackery....
Removed debugging printouts from the process module. Hopefully they
are all gone, now.
shadow_proto.h now correctly reflects that QuickDropString() and
DropString() do not return values.
MessageMaker() now handles 'APTR' arguments that point to sized
arguments correctly.
'TAGL' returns now freed correctly for Asnychronous messages.
(SHADOW_RETURN_TAGL)
ParseJazzMessage() now handles unrecognized messages better.
V1.2 added the following features:
Minor speed improvement in DJM(), especially when video contention is
high. ExecBase is no longer retrieved from address four in that
function.
Allows double to be returned from MethodFuncParse and from synchronous
messages. DJM() still does not support returning a double, however --
it uses the D1 returned for the next feature....
....Added METHOD_FLAG_CHECK_CONTINUE which allows runtime-driven choice
for continuing a method-chain. A method-chain is the name given to the
series of method sends that result from method patches. Please see
AutoDocs [DJM()].
MessageMaker() now an externally callable function.
PSem() can now attempt to lock a semaphore, and returns TRUE/FALSE if
it was successful.
Requesting DJM() to send a method ASYNC, now sends a slightly different
message structure to the process the method is run by. At that point,
DJM() is run normally. This allows METHOD_FLAG_CHECK_CONTINUE to
run correctly, so it is hoped. Without it, no method would have
actually returned a value, as they would have all been sent
asynchronously.
Asynchronous methods should now clean up after the resources that
they (might normally, if called) return. This assumes you have
set up your MethodRef structure correctly.
The RecurseBinTree() function and the InitTable() function now take
function callbacks that take their arguments in registers, rather than
on the stack as before.
DJM() now checks the doMethd callback when getting the superclass
(SHADOW_MSG_SUPER).
V1.2 changed the following names:
RemovePatchedVerb() --> RemovePatchedMethod()
All constants with JAZZ in their names have been changed to SHADOW.
There are still some function names that have Jazz as part of their
name rather than Shadow. They will probably remain named as they are.
my_putch() --> SprintfCallback()
AddNodePriWatchedList() --> AddWatchedSListNode()
various functions that began with lower case, now begins with upper-
case, for instance -- removeThread() --> RemoveThread().
V1.2 Outstanding problems:
What to do if programmer trying to create a class that already exists?
Changing BinTrees to AVL -- currently their performance is almost
always worst-case -- that is, singly-linked list.
Should PSem(ATTEMPT) nest?
Bugs?
--------------------------------------------------------------------------
V2.0 had some changes and bug fixes for Kent which apparently weren't
tracked. :(
Apparently this includes bug fixes to the Cluster/Composite routines.
Changed many __asm functions to __regargs for DICE compatibility.
--------------------------------------------------------------------------
V3.0
Changed CreateMeta so that it calls INIT on itself as soon as the
attributes and methods tables are set up. This allows complicated
memory allocation techniques to be used in class descriptions (such
as using the memory allocation routines provided to allocate classes
and objects).
See docs for new calling interface of that function.
Corrected CopyRight notices on header files.
--------------------------------------------------------------------------
V3.1
Do[Pre|In|Post]fixBinTree(...) changed to Do[Pre|In|Post]OrderBinTree()
RecurseBinTree() now takes a function that returns BOOL rather than
long. If the function ever returns FALSE, RecurseBinTree() stops
the recursive calls and returns FALSE. Otherwise, RecurseBinTree()
returns TRUE.
AVL trees now implemented for binary trees.
--------------------------------------------------------------------------
V3.2 13 Jan 1992
RecurseBinTree now handles func() returns differently. See AutoDocs.
Remove<blah>BinNode() functions now return sucess/failure of
operation. This includes the Watched BinTree operations as well.
AddClassWatcher() now more bullet-proof in low-memory conditions.
jp_process is -1 for process' without a parent.
AVL --> assembly.
W_SECOND value has changed.
W_FUNC and W_MATCH_FUNC have been removed. Please subclass the
Dispatch Method and implement that functionality yourself.
--------------------------------------------------------------------------
V4.0 14 Jan 1992
Director Class and Patcher Class has been much improved. We hope....
In addition, AddPatchedMethod/RemovePatchedMethod have been superceded
by the INIT/Remove methods of the Patcher Class. This allows Patcher
to be subclassed.
Directors can wath more than one place at a time with the new
ESTABLISH/TERMINATE methods.
More AVL to assembler....(Insert)
--------------------------------------------------------------------------
V4.1 19 Jan 1992
METHODHANDLERCLASS changed to PATCHERCLASS
ATTR_CORE of rootCluster fixed and renmed as ATTR_BAG
DJM() in CreateSub[Class|Cluster] now uses object->cob_class instead of
the passed class: works better for subclassing purposes
Added Semaphore checks in process thread startup and quit
Simplified ATTR_MANAGER structure for the flags field retrieval
and setting.
Removed unnecessary JOBJ parameter in NOTIFY! method.
W_ANY_CHANGE removed -- not defined correctly anyway....
IpcARGTransfer for Meta destruction is handled better (hopefully
even correctly)
--------------------------------------------------------------------------
V4.2 28 Jan 1992
Last AVL function -- RemoveBinNode -- finally transferred to asm.
Saved 500bytes!!!
Added ATTR_RESOURCEPROCESS to process class. Unused, but you may
keep track of resources on this watched binary tree.
FreeAllNodesBinTree can now free a tree that is NOT sorted by string
but it MUST be sorted by the same value as the object, or it MUST be
sorted on a value less than or equal to 255 and greater than or equal
to 0. This allows the AutoResourcss to add priority driven
resources.
Also changed AVL to sort on UNSIGNED rather than SIGNED keys.
Changed several EXCLUSIVE semaphores to SHARED, as they should be.
Hangs on badly written code are now more likely!
RemoveCurrentProgram() now handles messages on the ports while it
waits for all the processes using the program to stop using it.
BINTREE/LIST/VALUE constants have SHADOW_ added to them.
Added Resource Tracking calls for per process resource tracking:
AddAutoResource()
RemoveAutoResource()
Also added priority watched list which is auto-freed by PROCESSCLASS
just before exitting. This is where you might want to stick libraries,
etc. in the future.
The ATTR_RESOURCETREE is freed during the process
METHOD_META_REMOVE method, once at the start of RemoveThread(),
and once at the finish.
The ATTR_RESOURCESTACK is freed only at the start and finish of
RemoveThread(). This implies that the resources on the
ATTR_RESOURCESTACK must not reference the process, as
RemoveThread() is not called until there are no references on
a process.
Changed ATTR_RESOURCEPROCESS to ATTR_RESOURCETREE.
--------------------------------------------------------------------------
V4.3 First Public Release 01 Feb 1992
Sigh, as always, I found a bug right after it was shipped.
Browser no longer crashes when started under 1.3
--------------------------------------------------------------------------
V4.4
System String code now clears the low bit of the passed string.
Performance is hit a bit, but, using the browser, you should be
able to find mistakes with the string code by noting a flakey first
byte on your strings.
And I found some of mine -- methods and attributes are now aligned
properly within shadow, browser, and control.
--------------------------------------------------------------------------
V4.5
Strings can now be unaligned. 20% penalty for unaligned, 2% penalty for
aligned.
--------------------------------------------------------------------------
V4.6
Race condition removed from DIRECTORCLASS. access is now properly
semaphored. Access granted via ShadowBase->sb_strSemaphore
Many additions to shadow.lib makes reading the source a bit easier.
--------------------------------------------------------------------------
V4.7
Fixed bug with default attribute counts. Should now work properly.
--------------------------------------------------------------------------
V4.8
Methods now copy JMSG pointers correctly for Async messages.
--------------------------------------------------------------------------
V4.9 18 May 1992
method.h include changed -- ForceMethodEnd fixed and ResetPtr() added.
The Method DESTROY no longer has a race condition with disappearing proc
objects (we hope). It does the following:
In DropObject() when about to send DESTROY:
if object->cob_class != object
UseObject(class)/Call Method/DropObject(class)
else if mh = FindMethodHandle(class, METHOD_META_DESTROY)
UseObject(mh->defnObject)/call method/DropObject(mh->defnObject)
else
UseObject(class->ccl_superClass)/call method/DropObject(super);
In the ASYNC message parser (MessageParse):
UseObject(mh->defnObject)
call method
DropObject(mh->defnObject)
Preserves return values of the method -- d0/d1/a0/a1, which is
certainly more than needed now!
Fixed a method caching bug which would not cache methods which
were found by checking the superclass.... Leading to methods that were
slower than necessary.
Added ReplaceObject() to shadow.lib, and fixed a few doc bugs as well.
Added SHADOW_RECURSE_BACKORDER for reversing the ordering of the INORDER.
This allows GUI applications to render images from back to front, and
search for regions from font to back. Appropriate changes to binary.h
--------------------------------------------------------------------------
V4.10 18 May 1992
METHOD_META_CREATE should have never been in rootClass.c nor rootCluster.c
They aren't anymore....
--------------------------------------------------------------------------
V4.10a 29 Jun 1992
Semaphore race condition bugs fixed (we hope).
--------------------------------------------------------------------------
V4.11 09 Jul 1992
Semaphores fixed, DJM() functionality increased V4.11a, Process startup
work to begin now to fix below bug. Unfortunately, the fix will make me
backwards incompatible, I think....
--------------------------------------------------------------------------
Known bugs. JM by Steve Koren. Cannot change tc_UserData by any other than
that particular task.
--------------------------------------------------------------------------
V5.0 18 Sep 1992
Semaphores have many new features -- W/R/RW/maxcounts/Wait-on-alloc/etc.
Method sends have lots of new functions -- auto-process-start, etc.
Watcher changed to have name at first ptr after the CoreObject
Many name changes.
See docs for new features, there's just too many to name!
JM definitely fixed!
--------------------------------------------------------------------------
Any problems should be sent e-mail to jazz@netcom.com or via BIX: dnavas.